#include "CollectionDebugMsg.h"

configuration ExtDebugLogC {
  provides interface CollectionDebug;
  provides interface SplitControl;
}
implementation {
  components new SerialAMSenderC(DEBUG_AM_SERIAL);
  components new SerialAMReceiverC(DEBUG_AM_SERIAL);
  components ExtDebugLogP as DebugSender;
  components new TimerMilliC() as DebugTimer;
  components new TimerMilliC() as DelayTimer;

  components new PoolC(CollectionDebugMsg, 50) as DebugMessagePool;
  components new QueueC(CollectionDebugMsg*, 50) as DebugMessageQueue;

  components new LogStorageC(VOLUME_LOGTEST, FALSE);

  components LedsC;

  CollectionDebug = DebugSender.CollectionDebug;
  SplitControl = DebugSender.SplitControl;

  DebugSender.UARTSend -> SerialAMSenderC;
  DebugSender.UARTReceive -> SerialAMReceiverC;
  DebugSender.Pool -> DebugMessagePool;
  DebugSender.Queue -> DebugMessageQueue;
  DebugSender.DebugTimer -> DebugTimer;
  DebugSender.DelayTimer -> DelayTimer;
  DebugSender.LogRead -> LogStorageC;
  DebugSender.LogWrite -> LogStorageC;
  DebugSender.Leds -> LedsC;
}
